package com.migo.service.impl;

import com.migo.dao.MaterialCategoryDao;
import com.migo.entity.MaterialCategoryEntity;
import com.migo.service.MaterialCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service("materialCategoryService")
public class MaterialCategoryServiceImpl implements MaterialCategoryService {
    @Autowired
    private MaterialCategoryDao materialCategoryDao;

    @Override
    public MaterialCategoryEntity queryObject(Integer id) {
        return materialCategoryDao.queryObject(id);
    }

    @Override
    public List<MaterialCategoryEntity> queryList(Map<String, Object> map) {
        return materialCategoryDao.queryList(map);
    }

    @Override
    public List<MaterialCategoryEntity> queryListCategory(Map<String, Object> map) {
        if(map.containsKey("lang")){

        }
        return materialCategoryDao.queryListCategory(map);
    }

    @Override
    public int queryTotal(Map<String, Object> map) {
        return materialCategoryDao.queryTotal(map);
    }

    @Override
    public void save(MaterialCategoryEntity materialCategory) {
        materialCategoryDao.save(materialCategory);
    }

    @Override
    public void update(MaterialCategoryEntity materialCategory) {
        materialCategoryDao.update(materialCategory);
    }

    @Override
    public void delete(Integer id) {
        materialCategoryDao.delete(id);
    }

    @Override
    public void deleteBatch(Integer[] ids) {
        materialCategoryDao.deleteBatch(ids);
    }

}
